const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack');
const Components = require('unplugin-vue-components/webpack');
const { TDesignResolver } = require('unplugin-vue-components/resolvers');

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  productionSourceMap: false,
  publicPath: process.env.NODE_ENV === 'production'
    ? 'https://cdn.ice-starter.cn/navi/dist/'
    : '/',
  devServer:{
    port: 8080,
    proxy:"http://localhost:8001"
  },
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [TDesignResolver()],
      }),
      Components({
        resolvers: [TDesignResolver()],
      }),
    ],
  }
})
